home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / XmToggleButton.z.z / XmToggleButton.z / XmToggleButton
Encoding:
Text File  |  2003-11-18  |  32.0 KB  |  661 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _X_m_T_o_g_g_l_e_B_u_t_t_o_n - The ToggleButton widget class
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       #include <Xm/ToggleB.h>
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.       ToggleButton sets nontransitory state    data within an
  16.       application.    Usually    this widget consists of    an indicator
  17.       (square or diamond or    circle)    with either text or a pixmap
  18.       on one side of it.  However, it can also consist of just
  19.       text or a pixmap without the indicator.
  20.  
  21.       The toggle graphics display a    _1-_o_f-_m_a_n_y or _N-_o_f-_m_a_n_y
  22.       selection state.  When a toggle indicator is displayed, a
  23.       square with or without a check mark indicator    shows an _N-
  24.       _o_f-_m_a_n_y selection state and a    diamond    or a circle indicator
  25.       shows    a _1-_o_f-_m_a_n_y selection state.
  26.  
  27.       ToggleButton implies a selected or unselected    state.    In the
  28.       case of a label and an indicator, an empty indicator (square
  29.       or diamond or    circle shaped) indicates that ToggleButton is
  30.       unselected, and a filled indicator shows that    it is
  31.       selected.  The indicator may be filled with a    check mark or
  32.       the highlight    color.    In the case of a pixmap    toggle,
  33.       different pixmaps are    used to    display    the
  34.       selected/unselected states.
  35.  
  36.       The default behavior associated with a ToggleButton in a
  37.       menu depends on the type of menu system in which it resides.
  38.       By default, _B_S_e_l_e_c_t controls the behavior of the
  39.       ToggleButton.     In addition, _B_M_e_n_u controls the behavior of
  40.       the ToggleButton if it resides in a Menu system.  The    actual
  41.       mouse    button used is determined by its RowColumn parent.
  42.  
  43.       To accommodate the toggle indicator when created, Label's
  44.       resource _X_m_N_m_a_r_g_i_n_L_e_f_t may be    increased.
  45.  
  46.     CCCCllllaaaasssssssseeeessss
  47.       ToggleButton inherits    behavior and resources from _C_o_r_e,
  48.       _X_m_P_r_i_m_i_t_i_v_e, and _X_m_L_a_b_e_l Classes.
  49.  
  50.       The class pointer is _x_m_T_o_g_g_l_e_B_u_t_t_o_n_W_i_d_g_e_t_C_l_a_s_s.
  51.  
  52.       The class name is _X_m_T_o_g_g_l_e_B_u_t_t_o_n.
  53.  
  54.     NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
  55.       The following    table defines a    set of widget resources    used
  56.       by the programmer to specify data.  The programmer can also
  57.       set the resource values for the inherited classes to set
  58.       attributes for this widget.  To reference a resource by name
  59.       or by    class in a .Xdefaults file, remove the _X_m_N or _X_m_C
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       prefix and use the remaining letters.     To specify one    of the
  75.       defined values for a resource    in a .Xdefaults    file, remove
  76.       the _X_m prefix    and use    the remaining letters (in either
  77.       lowercase or uppercase, but include any underscores between
  78.       words).  The codes in    the access column indicate if the
  79.       given    resource can be    set at creation    time (C), set by using
  80.       _X_t_S_e_t_V_a_l_u_e_s (S), retrieved by    using _X_t_G_e_t_V_a_l_u_e_s (G), or is
  81.       not applicable (N/A).
  82.  
  83.                        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  84.      NNNNaaaammmmeeee              CCCCllllaaaassssssss                   TTTTyyyyppppeeee        DDDDeeeeffffaaaauuuulllltttt               AAAAcccccccceeeessssssss
  85.      ________________________________________________________________________________________________________
  86.      XmNarmCallback          XmCArmCallback           XtCallbackList    NULL               C
  87.      XmNdisarmCallback          XmCDisarmCallback           XtCallbackList    NULL               C
  88.      XmNfillOnSelect          XmCFillOnSelect           Boolean        dynamic               CSG
  89.      XmNindicatorOn          XmCIndicatorOn           Boolean        True               CSG
  90.      XmNindicatorSize          XmCIndicatorSize           Dimension    dynamic               CSG
  91.      XmNindicatorType          XmCIndicatorType           unsigned    char    dynamic               CSG
  92.      XmNselectColor          XmCSelectColor           Pixel        dynamic               CSG
  93.      XmNselectInsensitivePixmap      XmCSelectInsensitivePixmap   Pixmap        XmUNSPECIFIED_PIXMAP   CSG
  94.      XmNselectPixmap          XmCSelectPixmap           Pixmap        XmUNSPECIFIED_PIXMAP   CSG
  95.      XmNset              XmCSet               Boolean        False               CSG
  96.      XmNspacing              XmCSpacing               Dimension    4               CSG
  97.      XmNvalueChangedCallback      XmCValueChangedCallback      XtCallbackList    NULL               C
  98.      XmNvisibleWhenOff          XmCVisibleWhenOff           Boolean        dynamic               CSG
  99.  
  100.  
  101.       _X_m_N_a_r_m_C_a_l_l_b_a_c_k
  102.            Specifies the list of callbacks called when the
  103.            ToggleButton is armed.  To arm this widget, press the
  104.            active mouse button while the pointer is    inside the
  105.            ToggleButton.  For this callback, the reason is
  106.            _X_m_C_R__A_R_M.
  107.  
  108.       _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k
  109.            Specifies the list of callbacks called when
  110.            ToggleButton is disarmed.  To disarm this widget, press
  111.            and release the active mouse button while the pointer
  112.            is inside the ToggleButton.  This widget    is also
  113.            disarmed    when the user moves out    of the widget and
  114.            releases    the mouse button when the pointer is outside
  115.            the widget.  For    this callback, the reason is
  116.            _X_m_C_R__D_I_S_A_R_M.
  117.  
  118.       _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t
  119.            Fills the indicator with    the color specified in
  120.            _X_m_N_s_e_l_e_c_t_C_o_l_o_r and switches the top and bottom shadow
  121.            colors when set to True.     Otherwise, it switches    only
  122.            the top and bottom shadow colors.  The default is set
  123.            to the value of _X_m_N_i_n_d_i_c_a_t_o_r_O_n.    When _X_m_N_i_n_d_i_c_a_t_o_r_O_n is
  124.            False, and _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t is set explicitly to True,
  125.            the background is filled    with the color specified by
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  137.  
  138.  
  139.  
  140.            _X_m_N_s_e_l_e_c_t_C_o_l_o_r.
  141.  
  142.       _X_m_N_i_n_d_i_c_a_t_o_r_O_n
  143.            Specifies that a    toggle indicator is drawn to one side
  144.            of the toggle text or pixmap when set to    True.  When
  145.            set to False, no    space is allocated for the indicator,
  146.            and it is not displayed.     If _X_m_N_i_n_d_i_c_a_t_o_r_O_n is True,
  147.            the indicator shadows are switched when the button is
  148.            selected    or unselected, but, any    shadows    around the
  149.            entire widget are not switched.    However, if
  150.            _X_m_N_i_n_d_i_c_a_t_o_r_O_n is False,    any shadows around the entire
  151.            widget are switched when    the toggle is selected or
  152.            unselected.
  153.  
  154.       _X_m_N_i_n_d_i_c_a_t_o_r_S_i_z_e
  155.            Sets the    size of    the indicator.    If no value is
  156.            specified, the size of the indicator is based on    the
  157.            size of the label string    or pixmap.  If the label
  158.            string or pixmap    changes, the size of the indicator is
  159.            recomputed based    on the size of the label string    or
  160.            pixmap.    Once a value has been specified    for
  161.            _X_m_N_i_n_d_i_c_a_t_o_r_S_i_z_e, the indicator has that    size,
  162.            regardless of the size of the label string or pixmap,
  163.            until a new value is specified.
  164.  
  165.       _X_m_N_i_n_d_i_c_a_t_o_r_T_y_p_e
  166.            Specifies if the    indicator is a _1-_o_f or _N-_o_f indicator.
  167.            For the _1-_o_f indicator, the value is _X_m_O_N_E__O_F__M_A_N_Y.
  168.            For the _N-_o_f indicator, the value is _X_m_N__O_F__M_A_N_Y.
  169.  
  170.            The look    of the ToggleButton visual is controlled by
  171.            the XmDisplay resource _e_n_a_b_l_e_T_o_g_g_l_e_V_i_s_u_a_l.  The
  172.            _e_n_a_b_l_e_T_o_g_g_l_e_V_i_s_u_a_l resource defaults to False with the
  173.            following ToggleButton visuals:
  174.  
  175.       +o    _X_m_O_N_E__O_F__M_A_N_Y - a shadowed diamond
  176.  
  177.       +o    _X_m_N__O_F__M_A_N_Y - a shadowed    square
  178.  
  179.            When _e_n_a_b_l_e_T_o_g_g_l_e_V_i_s_u_a_l is True,    the ToggleButton
  180.            visuals are:
  181.  
  182.       +o    _X_m_O_N_E__O_F__M_A_N_Y - a shadowed circle
  183.  
  184.       +o    _X_m_N__O_F__M_A_N_Y - a shadowed    square with a check mark when
  185.            set
  186.  
  187.            This resource specifies only the    visuals    and does not
  188.            enforce the behavior.  When the ToggleButton is in a
  189.            RadioBox, the default is    _X_m_O_N_E__O_F__M_A_N_Y; otherwise, the
  190.            default is _X_m_N__O_F__M_A_N_Y.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 11/11/03)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  203.  
  204.  
  205.  
  206.       _X_m_N_s_e_l_e_c_t_C_o_l_o_r
  207.            Allows the application to specify what color fills the
  208.            center of the indicator when it is set.    If this    color
  209.            is the same as either the top or    the bottom shadow
  210.            color of    the indicator, a one-pixel-wide    margin is left
  211.            between the shadows and the fill; otherwise, it is
  212.            filled completely.  This    resource's default for a color
  213.            display depends on the value of the XmDisplay resource
  214.            _e_n_a_b_l_e_T_o_g_g_l_e_C_o_l_o_r.  If _e_n_a_b_l_e_T_o_g_g_l_e_C_o_l_o_r    is False (the
  215.            default), then is a color between the background    and
  216.            the bottom shadow color is chosen.  When
  217.            _e_n_a_b_l_e_T_o_g_g_l_e_C_o_l_o_r is True, then the select color    is the
  218.            highlight color for the widget.    For a monochrome
  219.            display,    the select color is set    to the foreground
  220.            color.  To set the background of    the button to
  221.            _X_m_N_s_e_l_e_c_t_C_o_l_o_r when _X_m_N_i_n_d_i_c_a_t_o_r_O_n is False, the    value
  222.            of _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t must be explicitly set to True.
  223.  
  224.       _X_m_N_s_e_l_e_c_t_I_n_s_e_n_s_i_t_i_v_e_P_i_x_m_a_p
  225.            Specifies a pixmap used as the button face when the
  226.            ToggleButton is selected    and the    button is insensitive
  227.            if the Label resource _X_m_N_l_a_b_e_l_T_y_p_e is set to _X_m_P_I_X_M_A_P.
  228.            If the ToggleButton is unselected and the button    is
  229.            insensitive, the    pixmap in _X_m_N_l_a_b_e_l_I_n_s_e_n_s_i_t_i_v_e_P_i_x_m_a_p is
  230.            used as the button face.     If no value is    specified for
  231.            _X_m_N_l_a_b_e_l_I_n_s_e_n_s_i_t_i_v_e_P_i_x_m_a_p, that resource    is set to the
  232.            value specified for _X_m_N_s_e_l_e_c_t_I_n_s_e_n_s_i_t_i_v_e_P_i_x_m_a_p.
  233.  
  234.       _X_m_N_s_e_l_e_c_t_P_i_x_m_a_p
  235.            Specifies the pixmap to be used as the button face if
  236.            _X_m_N_l_a_b_e_l_T_y_p_e is _X_m_P_I_X_M_A_P    and the    ToggleButton is
  237.            selected.  When the ToggleButton    is unselected, the
  238.            pixmap specified    in Label's _X_m_N_l_a_b_e_l_P_i_x_m_a_p is used.  If
  239.            no value    is specified for _X_m_N_l_a_b_e_l_P_i_x_m_a_p, that resource
  240.            is set to the value specified for _X_m_N_s_e_l_e_c_t_P_i_x_m_a_p.
  241.  
  242.       _X_m_N_s_e_t
  243.            Represents the state of the ToggleButton.  A value of
  244.            false indicates that the    ToggleButton is    not set.   A
  245.            value of    true indicates that the    ToggleButton is    set.
  246.            Setting this resource sets the state of the
  247.            ToggleButton.
  248.  
  249.       _X_m_N_s_p_a_c_i_n_g
  250.            Specifies the amount of spacing between the toggle
  251.            indicator and the toggle    label (text or pixmap).
  252.  
  253.       _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k
  254.            Specifies the list of callbacks called when the
  255.            ToggleButton value is changed.  To change the value,
  256.            press and release the active mouse button while the
  257.            pointer is inside the ToggleButton.  This action    also
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 11/11/03)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  269.  
  270.  
  271.  
  272.            causes this widget to be    disarmed.  For this callback,
  273.            the reason is _X_m_C_R__V_A_L_U_E__C_H_A_N_G_E_D.
  274.  
  275.       _X_m_N_v_i_s_i_b_l_e_W_h_e_n_O_f_f
  276.            Indicates that the toggle indicator is visible in the
  277.            unselected state    when the Boolean value is True.     When
  278.            the ToggleButton    is in a    menu, the default value    is
  279.            False.  When the    ToggleButton is    in a RadioBox, the
  280.            default value is    True.
  281.  
  282.     IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
  283.       ToggleButton inherits    behavior and resources from the
  284.       following superclasses.  For a complete description of each
  285.       resource, refer to the man page for that superclass.
  286.  
  287.                         XXXXmmmmLLLLaaaabbbbeeeellll    RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  288.      NNNNaaaammmmeeee             CCCCllllaaaassssssss                 TTTTyyyyppppeeee         DDDDeeeeffffaaaauuuulllltttt          AAAAcccccccceeeessssssss
  289.      ___________________________________________________________________________________________________________
  290.      XmNaccelerator         XmCAccelerator             String         NULL              CSG
  291.      XmNacceleratorText         XmCAcceleratorText         XmString         NULL              CSG
  292.      XmNalignment         XmCAlignment             unsigned char     dynamic          CSG
  293.      XmNfontList         XmCFontList             XmFontList         dynamic          CSG
  294.      XmNlabelInsensitivePixmap     XmCLabelInsensitivePixmap   Pixmap         XmUNSPECIFIED_PIXMAP      CSG
  295.      XmNlabelPixmap         XmCLabelPixmap             Pixmap         XmUNSPECIFIED_PIXMAP      CSG
  296.      XmNlabelString         XmCXmString             XmString         dynamic          CSG
  297.      XmNlabelType         XmCLabelType             unsigned char     XmSTRING          CSG
  298.      XmNmarginBottom         XmCMarginBottom         Dimension         dynamic          CSG
  299.      XmNmarginHeight         XmCMarginHeight         Dimension         2              CSG
  300.      XmNmarginLeft         XmCMarginLeft             Dimension         dynamic          CSG
  301.      XmNmarginRight         XmCMarginRight             Dimension         0              CSG
  302.      XmNmarginTop         XmCMarginTop             Dimension         dynamic          CSG
  303.      XmNmarginWidth         XmCMarginWidth             Dimension         2              CSG
  304.      XmNmnemonic         XmCMnemonic             KeySym         NULL              CSG
  305.      XmNmnemonicCharSet         XmCMnemonicCharSet         String         XmFONTLIST_DEFAULT_TAG      CSG
  306.      XmNrecomputeSize         XmCRecomputeSize         Boolean         True              CSG
  307.      XmNstringDirection         XmCStringDirection         XmStringDirection     dynamic          CSG
  308.  
  309.  
  310.                      XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  311.      NNNNaaaammmmeeee             CCCCllllaaaassssssss             TTTTyyyyppppeeee        DDDDeeeeffffaaaauuuulllltttt               AAAAcccccccceeeessssssss
  312.      ________________________________________________________________________________________________
  313.      XmNbottomShadowColor    XmCBottomShadowColor    Pixel        dynamic               CSG
  314.      XmNbottomShadowPixmap   XmCBottomShadowPixmap   Pixmap        XmUNSPECIFIED_PIXMAP   CSG
  315.      XmNforeground         XmCForeground         Pixel        dynamic               CSG
  316.      XmNhelpCallback         XmCCallback         XtCallbackList    NULL               C
  317.      XmNhighlightColor         XmCHighlightColor         Pixel        dynamic               CSG
  318.      XmNhighlightOnEnter     XmCHighlightOnEnter     Boolean        False               CSG
  319.      XmNhighlightPixmap         XmCHighlightPixmap         Pixmap        dynamic               CSG
  320.      XmNhighlightThickness   XmCHighlightThickness   Dimension        2               CSG
  321.      XmNnavigationType         XmCNavigationType         XmNavigationType    XmNONE               CSG
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 11/11/03)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  335.  
  336.  
  337.  
  338.      XmNshadowThickness         XmCShadowThickness         Dimension        dynamic               CSG
  339.      XmNtopShadowColor         XmCTopShadowColor         Pixel        dynamic               CSG
  340.      XmNtopShadowPixmap         XmCTopShadowPixmap         Pixmap        dynamic               CSG
  341.      XmNtraversalOn         XmCTraversalOn         Boolean        True               CSG
  342.      XmNunitType         XmCUnitType         unsigned char    dynamic               CSG
  343.      XmNuserData         XmCUserData         XtPointer        NULL               CSG
  344.  
  345.  
  346.                            CCCCoooorrrreeee    RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  347.      NNNNaaaammmmeeee                 CCCCllllaaaassssssss                 TTTTyyyyppppeeee          DDDDeeeeffffaaaauuuulllltttt             AAAAcccccccceeeessssssss
  348.      ______________________________________________________________________________________________________________
  349.      XmNaccelerators             XmCAccelerators             XtAccelerators   dynamic             CSG
  350.      XmNancestorSensitive         XmCSensitive             Boolean          dynamic             G
  351.      XmNbackground             XmCBackground             Pixel          dynamic             CSG
  352.      XmNbackgroundPixmap         XmCPixmap                 Pixmap          XmUNSPECIFIED_PIXMAP   CSG
  353.      XmNborderColor             XmCBorderColor             Pixel          XtDefaultForeground    CSG
  354.      XmNborderPixmap             XmCPixmap                 Pixmap          XmUNSPECIFIED_PIXMAP   CSG
  355.      XmNborderWidth             XmCBorderWidth             Dimension          0                 CSG
  356.      XmNcolormap             XmCColormap             Colormap          dynamic             CG
  357.      XmNdepth                 XmCDepth                 int          dynamic             CG
  358.      XmNdestroyCallback             XmCCallback             XtCallbackList   NULL             C
  359.      XmNheight                 XmCHeight                 Dimension          dynamic             CSG
  360.      XmNinitialResourcesPersistent   XmCInitialResourcesPersistent   Boolean          True             C
  361.      XmNmappedWhenManaged         XmCMappedWhenManaged         Boolean          True             CSG
  362.      XmNscreen                 XmCScreen                 Screen *          dynamic             CG
  363.      XmNsensitive             XmCSensitive             Boolean          True             CSG
  364.      XmNtranslations             XmCTranslations             XtTranslations   dynamic             CSG
  365.      XmNwidth                 XmCWidth                 Dimension          dynamic             CSG
  366.      XmNx                 XmCPosition             Position          0                 CSG
  367.      XmNy                 XmCPosition             Position          0                 CSG
  368.  
  369.  
  370.     CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  371.       A pointer to the following structure is passed to each
  372.       callback:
  373.       typedef struct
  374.       {
  375.         int         rrrreeeeaaaassssoooonnnn;
  376.         _X_E_v_e_n_t     **** eeeevvvveeeennnntttt;
  377.         _i_n_t         sssseeeetttt;
  378.       } _X_m_T_o_g_g_l_e_B_u_t_t_o_n_C_a_l_l_b_a_c_k_S_t_r_u_c_t;
  379.  
  380.       rrrreeeeaaaassssoooonnnn
  381.            Indicates why the callback was invoked
  382.  
  383.       eeeevvvveeeennnntttt
  384.            Points to the _X_E_v_e_n_t that triggered the callback
  385.  
  386.       sssseeeetttt  Reflects    the ToggleButton's current state when the
  387.            callback    occurred, either True (selected) or False
  388.            (unselected)
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                        (printed 11/11/03)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  401.  
  402.  
  403.  
  404.     TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss
  405.       XmToggleButton includes translations from Primitive.
  406.       Additional XmToggleButton translations for buttons not in a
  407.       menu system are listed below.     These translations may    not
  408.       directly correspond to a translation table.
  409.  
  410.       Note that altering translations in #_o_v_e_r_r_i_d_e or #_a_u_g_m_e_n_t
  411.       mode is undefined.
  412.       BDragPress:     ProcessDrag()
  413.       BSelect Press: Arm()
  414.       BSelect Release:Select()
  415.              Disarm()
  416.       KHelp:     Help()
  417.       KSelect:     ArmAndActivate()
  418.  
  419.       XmToggleButton inherits menu traversal translations from
  420.       XmLabel.  Additional XmToggleButton translations for
  421.       ToggleButtons    in a menu system are listed below.  In a menu
  422.       system, _B_M_e_n_u    also performs the _B_S_e_l_e_c_t actions.  These
  423.       translations may not directly    correspond to a    translation
  424.       table.
  425.       BSelect Press: BtnDown()
  426.       BSelect Release:BtnUp()
  427.       KHelp:     Help()
  428.       KActivate:     ArmAndActivate()
  429.       KSelect:     ArmAndActivate()
  430.       MAny KCancel:     MenuShellPopdownOne()
  431.  
  432.     AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss
  433.       The XmToggleButton action routines are described below:
  434.  
  435.       _A_r_m():
  436.            If the button was previously unset, this    action does
  437.            the following:  If _X_m_N_i_n_d_i_c_a_t_o_r_O_n is True, it draws the
  438.            indicator shadow    so that    the indicator looks pressed;
  439.            if _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t is True, it fills the    indicator with
  440.            the color specified by _X_m_N_s_e_l_e_c_t_C_o_l_o_r.  If
  441.            _X_m_N_i_n_d_i_c_a_t_o_r_O_n is False,    it draws the button shadow so
  442.            that the    button looks pressed.  If _X_m_N_l_a_b_e_l_T_y_p_e is
  443.            _X_m_P_I_X_M_A_P, the _X_m_N_s_e_l_e_c_t_P_i_x_m_a_p is    used as    the button
  444.            face.  Calls the    _X_m_N_a_r_m_C_a_l_l_b_a_c_k callbacks.
  445.  
  446.            If the button was previously set, this action does the
  447.            following:  If both _X_m_N_i_n_d_i_c_a_t_o_r_O_n and
  448.            _X_m_N_v_i_s_i_b_l_e_W_h_e_n_O_f_f are True, it draws the    indicator
  449.            shadow so that the indicator looks raised; if
  450.            _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t is True,    it fills the indicator with
  451.            the background color.  If _X_m_N_i_n_d_i_c_a_t_o_r_O_n    is False, it
  452.            draws the button    shadow so that the button looks
  453.            raised.    If _X_m_N_l_a_b_e_l_T_y_p_e    is _X_m_P_I_X_M_A_P, the
  454.            _X_m_N_l_a_b_e_l_P_i_x_m_a_p is used as the button face.  Calls the
  455.            _X_m_N_a_r_m_C_a_l_l_b_a_c_k callbacks.
  456.  
  457.  
  458.  
  459.      Page 7                        (printed 11/11/03)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  467.  
  468.  
  469.  
  470.       _A_r_m_A_n_d_A_c_t_i_v_a_t_e():
  471.            If the ToggleButton was previously set, unsets it; if
  472.            the ToggleButton    was previously unset, sets it.
  473.  
  474.            In a menu, does the following:  Unposts all menus in
  475.            the menu    hierarchy.  Unless the button is already
  476.            armed, calls the    _X_m_N_a_r_m_C_a_l_l_b_a_c_k callbacks.  Calls the
  477.            _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k and _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k
  478.            callbacks.
  479.  
  480.            Outside a menu, if the button was previously unset,
  481.            this action does    the following:    If _X_m_N_i_n_d_i_c_a_t_o_r_O_n is
  482.            True, it    draws the indicator shadow so that the
  483.            indicator looks pressed;    if _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t is True, it
  484.            fills the indicator with    the color specified by
  485.            _X_m_N_s_e_l_e_c_t_C_o_l_o_r.    If _X_m_N_i_n_d_i_c_a_t_o_r_O_n is False, it draws
  486.            the button shadow so that the button looks pressed.  If
  487.            _X_m_N_l_a_b_e_l_T_y_p_e is _X_m_P_I_X_M_A_P, the _X_m_N_s_e_l_e_c_t_P_i_x_m_a_p is    used
  488.            as the button face.  Calls the _X_m_N_a_r_m_C_a_l_l_b_a_c_k,
  489.            _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k,    and _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k
  490.            callbacks.
  491.  
  492.            Outside a menu, if the button was previously set, this
  493.            action does the following:  If both _X_m_N_i_n_d_i_c_a_t_o_r_O_n and
  494.            _X_m_N_v_i_s_i_b_l_e_W_h_e_n_O_f_f are True, it draws the    indicator
  495.            shadow so that the indicator looks raised; if
  496.            _X_m_N_f_i_l_l_O_n_S_e_l_e_c_t is True,    it fills the indicator with
  497.            the background color.  If _X_m_N_i_n_d_i_c_a_t_o_r_O_n    is False, it
  498.            draws the button    shadow so that the button looks
  499.            raised.    If _X_m_N_l_a_b_e_l_T_y_p_e    is _X_m_P_I_X_M_A_P, the
  500.            _X_m_N_l_a_b_e_l_P_i_x_m_a_p is used as the button face.  Calls the
  501.            _X_m_N_a_r_m_C_a_l_l_b_a_c_k, _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k,    and
  502.            _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k callbacks.
  503.  
  504.       _B_t_n_D_o_w_n():
  505.            This action unposts any menus posted by the
  506.            ToggleButton's parent menu, disables keyboard traversal
  507.            for the menu, and enables mouse traversal for the menu.
  508.            It draws    the shadow in the armed    state and, unless the
  509.            button is already armed,    calls the _X_m_N_a_r_m_C_a_l_l_b_a_c_k
  510.            callbacks.
  511.  
  512.       _B_t_n_U_p():
  513.            This action unposts all menus in    the menu hierarchy.
  514.            If the ToggleButton was previously set, unsets it; if
  515.            the ToggleButton    was previously unset, sets it.    It
  516.            calls the _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k callbacks and then
  517.            the _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k callbacks.
  518.  
  519.       _D_i_s_a_r_m():
  520.            Calls the callbacks for _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k.
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                        (printed 11/11/03)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  533.  
  534.  
  535.  
  536.       _H_e_l_p():
  537.            In a Pulldown or    Popup MenuPane,    unposts    all menus in
  538.            the menu    hierarchy and restores keyboard    focus to the
  539.            widget that had the focus before    the menu system    was
  540.            entered.     Calls the callbacks for _X_m_N_h_e_l_p_C_a_l_l_b_a_c_k if
  541.            any exist.  If there are    no help    callbacks for this
  542.            widget, this action calls the help callbacks for    the
  543.            nearest ancestor    that has them.
  544.  
  545.       _M_e_n_u_S_h_e_l_l_P_o_p_d_o_w_n_O_n_e():
  546.            In a toplevel Pulldown MenuPane from a MenuBar, unposts
  547.            the menu, disarms the MenuBar CascadeButton and the
  548.            MenuBar,    and restores keyboard focus to the widget that
  549.            had the focus before the    MenuBar    was entered.  In other
  550.            Pulldown    MenuPanes, unposts the menu.
  551.  
  552.            In a Popup MenuPane, unposts the    menu and restores
  553.            keyboard    focus to the widget from which the menu    was
  554.            posted.
  555.  
  556.       _P_r_o_c_e_s_s_D_r_a_g():
  557.            Drags the contents of a ToggleButton label, identified
  558.            by pressing _B_D_r_a_g.  This    action creates a DragContext
  559.            object whose _X_m_N_e_x_p_o_r_t_T_a_r_g_e_t_s resource is set to
  560.            "COMPOUND_TEXT" for a label type    of _X_m_S_T_R_I_N_G;
  561.            otherwise, "PIXMAP" if the label    type is    _X_m_P_I_X_M_A_P.
  562.            This action is undefined    for ToggleButtons used in a
  563.            menu system.
  564.  
  565.            This action is disabled if the XmDisplay's
  566.            _e_n_a_b_l_e_U_n_s_e_l_e_c_t_a_b_l_e_D_r_a_g resource is True.
  567.  
  568.       _S_e_l_e_c_t():
  569.            If the pointer is within    the button, takes the
  570.            following actions:  If the button was previously    unset,
  571.            sets it;    if the button was previously set, unsets it.
  572.            Calls the _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k callbacks.
  573.  
  574.     AAAAddddddddiiiittttiiiioooonnnnaaaallll BBBBeeeehhhhaaaavvvviiiioooorrrr
  575.       This widget has the additional behavior described below:
  576.  
  577.       <_E_n_t_e_r_W_i_n_d_o_w>:
  578.            In a menu, if keyboard traversal    is enabled, this
  579.            action does nothing.  Otherwise,    it draws the shadow in
  580.            the armed state and calls the _X_m_N_a_r_m_C_a_l_l_b_a_c_k callbacks.
  581.  
  582.            If the ToggleButton is not in a menu and    the cursor
  583.            leaves and then reenters    the ToggleButton's window
  584.            while the button    is pressed, this action    restores the
  585.            button's    armed appearance.
  586.  
  587.       <_L_e_a_v_e_W_i_n_d_o_w>:
  588.  
  589.  
  590.  
  591.      Page 9                        (printed 11/11/03)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  599.  
  600.  
  601.  
  602.            In a menu, if keyboard traversal    is enabled, this
  603.            action does nothing.  Otherwise,    it draws the shadow in
  604.            the unarmed state and calls the _X_m_N_d_i_s_a_r_m_C_a_l_l_b_a_c_k
  605.            callbacks.
  606.  
  607.            If the ToggleButton is not in a menu and    the cursor
  608.            leaves the ToggleButton's window    while the button is
  609.            pressed,    this action restores the button's unarmed
  610.            appearance.
  611.  
  612.     VVVViiiirrrrttttuuuuaaaallll    BBBBiiiinnnnddddiiiinnnnggggssss
  613.       The bindings for virtual keys    are vendor specific.  For
  614.       information about bindings for virtual buttons and keys, see
  615.       _V_i_r_t_u_a_l_B_i_n_d_i_n_g_s(_3_X).
  616.  
  617.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  618.       _C_o_r_e(_3_X), _X_m_C_r_e_a_t_e_R_a_d_i_o_B_o_x(_3_X), _X_m_C_r_e_a_t_e_T_o_g_g_l_e_B_u_t_t_o_n(_3_X),
  619.       _X_m_D_i_s_p_l_a_y(_3_x), _X_m_L_a_b_e_l(_3_X), _X_m_P_r_i_m_i_t_i_v_e(_3_X),
  620.       _X_m_R_o_w_C_o_l_u_m_n(_3_X), _X_m_T_o_g_g_l_e_B_u_t_t_o_n_G_e_t_S_t_a_t_e(_3_X), and
  621.       _X_m_T_o_g_g_l_e_B_u_t_t_o_n_S_e_t_S_t_a_t_e(_3_X).
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.      Page 10                        (printed 11/11/03)
  658.  
  659.  
  660.  
  661.